package com.lean.android.network

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable


@Serializable
data class ApiResponse<out T>(
    @SerialName("code") val code: Int,
    @SerialName("message") val msg: String,
    @SerialName("data") val data: T
) {

    fun isSuccessful() = code == 0 || code == 200
}